package com.sky.exception;

import com.sky.result.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author LENOVO
 * @version 1.0
 * @date 2025/3/26 下午10:53
 */

@RestControllerAdvice
public class PrivilegeExceptionHandler {
    @ExceptionHandler
    public Result<String> exceptionHandler(AuthException e){
        return Result.error(e.getMessage());
    }
}